<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>无标题文档</title>
<link href="css/style.css" rel="stylesheet" type="text/css" />
<link href="css/select.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="js/jquery.js"></script>
<script type="text/javascript" src="js/jquery.idTabs.min.js"></script>
<script type="text/javascript" src="js/select-ui.min.js"></script>
<script type="text/javascript" src="../js/layer/layer.js"></script>

<script type="text/javascript">
function goPage(a){
	var id = a.id;
	location.href = id;
}
function deleteTopic(a){
	var r = confirm("确定要删除该主题吗？");
	if (r==true) {
	  	location.href = a.id;
	}else if (r==false){
		
	}
}

$(document).ready(function(){
    $(".select1").uedSelect({
        width : 345           
    });
    $(".select2").uedSelect({
        width : 167  
    });
    $(".select3").uedSelect({
        width : 100
    });

  $(".click").click(function(){
  $(".tip").fadeIn(200);
  });
  
  $(".tiptop a").click(function(){
  $(".tip").fadeOut(200);
});

  $(".sure").click(function(){
  $(".tip").fadeOut(100);
});

  $(".cancel").click(function(){
  $(".tip").fadeOut(100);
});

});
</script>


</head>


<body>

    <div class="place">
    <span>位置：</span>
    <ul class="placeul">
    <li><a href="#">主题管理</a></li>
    <li><a href="#">主题列表</a></li>
    </ul>
    </div>
    
    <div class="rightinfo">
    
    
    <!-- <ul class="seachform">
    <li><label>标题</label><input name="" type="text" class="scinput" /></li>
    <li><label>发帖用户</label><input name="" type="text" class="scinput" /></li>
    
    
    <li><label>发帖时间</label><input name="" type="text" class="scinput" /></li>
    
    <li><label>帖子状态</label>  
    <div class="vocation">
    <select class="select3">
    <option>全部</option>
    <option>未审核</option>
    <option>通过审核</option>
    <option>未通过审核</option>
    <option>加精</option>
    </select>
    </div>
    </li>
    
    <li><label>&nbsp;</label><input name="" type="button" class="scbtn" value="查询"/></li>
    
    </ul> -->
    
    <table class="tablelist">
        <thead>
        <tr>
        <!-- <th><input name="" type="checkbox" value="" checked="checked"/></th> -->
        <th>主题名<i class="sort"></i></th>
        <th>描述</th>
        <th>帖子数</th>
        <!-- <th>查看数</th>
        <th>回复数</th>
        <th>发帖时间</th>
        <th>帖子状态</th> -->
        <th>操作</th>
        </tr>
        </thead>
        <tbody>
        <c:forEach items="${request.page.queryResult }" var="topic">
        	<tr>
	        <td>${topic.topicName }</td>
	        <td>${topic.describe }</td>
	        <td>${topic.postNum }</td>
	        <td>
	        <a href="TopicAction_getSingleTopic.action?id=${topic.id }" class="tablelink">修改</a>
	        <%-- <a href="javascript:void(0)" id="TopicAction_deleteTopic.action?id=${topic.id }" class="tablelink" onclick="deleteTopic(this)">删除</a> --%>
	        </td>
	        </tr>
        </c:forEach>
        </tbody>
    </table>
    
   
    <div class="pagin">
		<div class="message">
			共<i class="blue">${page.recordCount }</i>条记录，<i class="blue">${page.pageCount }</i>页，当前显示第&nbsp;<i class="blue">${page.currentPageNo }&nbsp;</i>页
		</div>
		<ul class="paginList">
			<li class="paginItem">
			<c:if test="${page.currentPageNo>1 }">
			    <a id="TopicAction_getPageResult.action?pagenum=${page.currentPageNo-1 }" onclick="goPage(this)">
			    	<span class="pagepre"></span><!-- 上一页 -->
			    </a>
			</c:if>
			</li>
			<li class="paginItem current">
				<a href="javascript:;">${page.currentPageNo }</a>
			</li>
			<li class="paginItem">
			<c:if test="${page.currentPageNo<page.pageCount }">
    			<a id="TopicAction_getPageResult.action?pagenum=${page.currentPageNo+1 }" onclick="goPage(this)">
    				<span class="pagenxt"></span>
    			</a>
    		</c:if>
			</li>
		</ul>
	</div>
    
    </div>
    <script type="text/javascript">
    $('.tablelist tbody tr:odd').addClass('odd');
    </script>

</body>

</html>
